package com.zimmur.tools;

import java.util.HashMap;

import com.zimmur.common.StatusCodeEnum;

/**
 * RestFul返回数据
 * @author Administrator
 *
 */
public class JsonEntity {
	private String code;
	private String msg;
	private String error="";
	private Object data;
	
	public JsonEntity(StatusCodeEnum codeEnum){
		this.code = codeEnum.getCode();
		this.msg = codeEnum.getMsg();
	}
	
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getMsg() {
		return msg;
	}
	public void setMsg(String msg) {
		this.msg = msg;
	}
	public String getError() {
		return error;
	}
	public void setError(String error) {
		this.error = error;
	}
	public Object getData() {
		return data==null?new HashMap<>():data;
	}
	public void setData(Object data) {
		this.data = data;
	}
	
	
}
